//
//  AppDelegate.m
//  导航控制器
//
//  Created by apple on 15/9/16.
//  Copyright (c) 2015年 戴维营. All rights reserved.
//

#import "AppDelegate.h"

#import "ViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //设置整个应用中导航条的颜色
    
    [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]];
    
   
    
    //设置导航条上按钮的文字和图标的颜色
    
    [[UINavigationBar appearance] setTintColor:[UIColor greenColor]];
    
    
    CGRect rect = [UIScreen mainScreen].bounds;
    
    self.window = [[UIWindow alloc] initWithFrame:rect];
    
    [self.window makeKeyAndVisible];
    

    ViewController *viewCtrl = [[ViewController alloc] init];
    
    //创建导航控制器，并使用根视图控制器初始化：
    
    UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:viewCtrl];
    
//    显示一个页面
    self.window.rootViewController = navCtrl;
    
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {

}

- (void)applicationDidEnterBackground:(UIApplication *)application {

}

- (void)applicationWillEnterForeground:(UIApplication *)application {

}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    
}

- (void)applicationWillTerminate:(UIApplication *)application {
}

@end
